#pragma once
#include <graphics.h>
#include<cmath>
//#include"enemy.h"
using namespace std;
class Bullet
{
private:
	
   int size=5;
	int speed=30;
	int damage=10;
	const int RADIUS = 10;
public:
	void bulletfly(POINT point)
	{
			double lx = point.x - position.x;
			double ly = point.y - position.y;
			double l = sqrt(lx * lx + ly * ly);
			position.x = position.x + lx / l * speed;
			position.y = position.y + ly / l * speed;
	}
	const int getdamage()const
	{
		return damage;
	}
	POINT position= { 0,0 };
	Bullet() {}
	Bullet(POINT weizhi, int size1, int speed1, int damage1)
	{
		position = weizhi;
		size = size1;
		speed = speed1;
		damage = damage1;
	}
	void draw()
	{
		setlinecolor(RGB(225, 125, 50));
		setfillcolor(RGB(200, 75, 10));
		fillcircle(position.x, position.y, RADIUS);
	}

};
